package com.rpc.demo.common;

import java.util.List;
import java.util.Random;

/**
 * @Author: ZhaoJie
 * @Date: 2022/4/6
 * @Description:
 * @Modify: ===================================================
 * Modifier        Modifytime        Description
 * ===================================================
 */

public class RandomLoadBalance {

    public String doSelect(List<String> providerList) {
        int size = providerList.size();
        Random random = new Random();
        return providerList.get(random.nextInt(size));
    }
}
